{include file="public/header" /}
<style>
  .content img {
    transition-duration: 0.5s;
  }

  .content img:hover {
    transform: scale(3);
  }

  .content .imageframe {
    width: 200px;
    height: 113px;
    overflow: hidden;

  }
</style>
<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <div class="subject">
        <h3>{$Think.lang.two_goods}</h3>
        <h5></h5>
      </div>
      {include file="public/admin_items" /}
    </div>
  </div>
  <div class="fixed-empty"></div>

  <form method="get" name="formSearch" id="formSearch">
    <div class="ds-search-form">
      <dl>
        <dt>{$Think.lang.two_goods_name}</dt>
        <dd><input type="text" value="{$Request.get.search_goods_name|default=''}" name="search_goods_name"
            id="search_goods_name" class="txt"></dd>
      </dl>
      <dl>
        <dt>商品品牌：</dt>
        <dd>
          <div id="ajax_brand" class="dssc-brand-select w180">
            <div class="selection">
              <input name="b_name" id="b_name" value="{$Request.param.b_name|default=''}" type="text" class="txt w180"
                readonly="readonly" />
              <input type="hidden" name="b_id" id="b_id" value="{$Request.param.b_id|default=''}" />
            </div>
            <div class="dssc-brand-select-container">
              <div class="brand-index" data-url="{:url('Common/ajax_get_brand')}">
                <div class="letter" dstype="letter">
                  <ul>
                    <li style="width: auto;"><a href="javascript:void(0);" data-letter="all">所有品牌</a></li>
                    <li style="width: auto;"><a href="javascript:void(0);" data-letter="A">A</a></li>
                    <li><a href="javascript:void(0);" data-letter="B">B</a></li>
                    <li><a href="javascript:void(0);" data-letter="C">C</a></li>
                    <li><a href="javascript:void(0);" data-letter="D">D</a></li>
                    <li><a href="javascript:void(0);" data-letter="E">E</a></li>
                    <li><a href="javascript:void(0);" data-letter="F">F</a></li>
                    <li><a href="javascript:void(0);" data-letter="G">G</a></li>
                    <li><a href="javascript:void(0);" data-letter="H">H</a></li>
                    <li><a href="javascript:void(0);" data-letter="I">I</a></li>
                    <li><a href="javascript:void(0);" data-letter="J">J</a></li>
                    <li><a href="javascript:void(0);" data-letter="K">K</a></li>
                    <li><a href="javascript:void(0);" data-letter="L">L</a></li>
                    <li><a href="javascript:void(0);" data-letter="M">M</a></li>
                    <li><a href="javascript:void(0);" data-letter="N">N</a></li>
                    <li><a href="javascript:void(0);" data-letter="O">O</a></li>
                    <li><a href="javascript:void(0);" data-letter="P">P</a></li>
                    <li><a href="javascript:void(0);" data-letter="Q">Q</a></li>
                    <li><a href="javascript:void(0);" data-letter="R">R</a></li>
                    <li><a href="javascript:void(0);" data-letter="S">S</a></li>
                    <li><a href="javascript:void(0);" data-letter="T">T</a></li>
                    <li><a href="javascript:void(0);" data-letter="U">U</a></li>
                    <li><a href="javascript:void(0);" data-letter="V">V</a></li>
                    <li><a href="javascript:void(0);" data-letter="W">W</a></li>
                    <li><a href="javascript:void(0);" data-letter="X">X</a></li>
                    <li><a href="javascript:void(0);" data-letter="Y">Y</a></li>
                    <li><a href="javascript:void(0);" data-letter="Z">Z</a></li>
                    <li><a href="javascript:void(0);" data-letter="0-9">其他</a></li>
                  </ul>
                </div>
                <div class="search" dstype="search"><input name="search_brand_keyword" id="search_brand_keyword"
                    type="text" class="text" /><a href="javascript:void(0);" class="dssc-btn-mini"
                    style="vertical-align: top;">Go</a></div>
              </div>
              <div class="brand-list" dstype="brandList">
                <ul dstype="brand_list">
                  {notempty name="brand_list"}
                  {foreach name="brand_list" item="val"}
                  <li data-id='{$val.brand_id}' data-name='{$val.brand_name}'>
                    <em>{$val.brand_initial}</em>{$val.brand_name}</li>
                  {/foreach}
                  {/notempty}
                </ul>
              </div>
              <div class="no-result" dstype="noBrandList" style="display: none;">{$Think.lang.no_brand_result}</div>
            </div>
          </div>
        </dd>
      </dl>
      <dl>
        <dt>联系方式：</dt>
        <dd><input type="text" value="{$Request.get.phone|default=''}" name="phone" id="phone" class="txt"></dd>
      </dl>
      <dl>
        <dt>卖家类型：</dt>
        <dd> <select name="types">
            <option value="" selected>{$Think.lang.ds_please_choose}</option>
            <option value="1" <?php if(isset($_GET['types'])&&$_GET['types']==1){?>selected <?php } ?>>平台</option>
            <option value="2" <?php if(isset($_GET['types'])&&$_GET['types']==2){?>selected <?php } ?>>用户</option>
          </select></dd>
      </dl>
      <dl>
        <dt>状态：</dt>
        <dd> <select name="status">
            <option value="" selected>{$Think.lang.ds_please_choose}</option>
            <option value="2" <?php if(isset($_GET['status'])&&$_GET['status']==2){?>selected <?php } ?>>审核失败</option>
            <option value="1" <?php if(isset($_GET['status'])&&$_GET['status']==1){?>selected <?php } ?>>上架</option>
            <option value="3" <?php if(isset($_GET['status'])&&$_GET['status']==3){?>selected <?php } ?>>下架</option>
            <option value="-2" <?php if(isset($_GET['status'])&&$_GET['status']==-2){?>selected <?php } ?>>已删除</option>
            <option value="0" <?php if(isset($_GET['status'])&&$_GET['status']==0){?>selected <?php } ?>>待审核</option>
          </select></dd>
      </dl>

      <dl>
        <dt>提交时间</dt>
        <dd>
          <input type="text" class="txt date" readonly="readonly" name="query_start_time" id="query_start_time"
            value="{$Request.param.query_start_time}">
          &nbsp;–&nbsp;
          <input id="query_end_time" class="txt date"  readonly="readonly" type="text" name="query_end_time"
            value="{$Request.param.query_end_time}">
        </dd>
      </dl>
      <dl>
        <div class="btn_group">
          <input type="hidden" name="type" value="{$Request.param.type}">
          <a href="javascript:void(0);" id="dssubmit" class="btn "
            title="{$Think.lang.ds_query}">{$Think.lang.ds_query}</a>
          <a href="{:url('Twogoods/index',['type'=>$Request.param.type])}" class="btn btn-default"
            title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
        </div>
    </div>
  </form>


  <table class="ds-default-table">
    <thead>
      <tr class="thead">
        <th class="w60 align-center">{$Think.lang.two_goods_id}</th>
        <th >商品名称</th>
        <th >卖家类型</th>
        <th >{$Think.lang.category}</th>
        <th >售价</th>
        <th >提交时间</th>
        <th>{$Think.lang.phone}</th>
        <th class="w72 align-center">状态</th>
        <th class="w250 align-center">{$Think.lang.ds_handle}</th>
      </tr>
    </thead>
    <tbody>
      {notempty name="goods_list"}
      <?php $index=1;foreach( $goods_list as $k=>$v){?>
      <tr class="hover edit" id="ds_row_{$v.goods_commonid}">
        <td class="align-center">{$index}</td>
        <td>{$v.goods_name}</td>
        <td>{$v.store_name}</td>
        <td>
          <p><?php if(empty($v['gc_name'])){echo '通用';}else{ echo $v['gc_name'];} ?></p>
          <p class="goods-brand">{$Think.lang.ds_brand}：{$v.brand_name}</p>
        </td>
        <td class="align-center">{$v.goods_price}</td>
        <td class="align-center">{:date('Y-m-d H:i:s', $v.goods_addtime)}</td>
        <td class="align-center">{$v.two_phone}</td>
        <td class="align-center">{$verify[$v['goods_status']]}</td>
        <td class="align-center w460" style="width: 200px;">

          <a href="javascript:void(0);" class="dsui-btn-view" onclick="goods_content({$v['goods_commonid']});"><i
              class="iconfont"></i>{if $v.goods_status == 0}审核{else/}{$Think.lang.ds_view} {/if}</a>
          <a href="{:url('Twogoods/edit_goods',['commonid'=>$v.goods_commonid])}" class="dsui-btn-edit"><i
              class="iconfont"></i>编辑</a>
          <?php  if($v['store_id']==0){?>
          <a href="javascript:void(0);"
            onclick="ds_ajaxget_confirm('{:url('Twogoods/drop_goods',['commonid'=>$v.goods_commonid])}','{$Think.lang.ds_ensure_del}');"
            class="dsui-btn-edit"><i class="iconfont"></i>删除</a>
          <?php }?>
          <?php  if($v['goods_status']==1){?>
          <a href="javascript:void(0);"
            onclick="ds_ajaxget_confirm('{:url('Twogoods/goods_status',['commonid'=>$v.goods_commonid])}','确定要下架吗？');"
            class="dsui-btn-edit"><i class="iconfont"></i>{if $v['goods_status']==3}上架{elseif
            $v['goods_status']==1}下架{/if}</a>
          <?php }else if($v['goods_status']==3){?>
          <a href="javascript:void(0);"
            onclick="ds_ajaxget_confirm('{:url('Twogoods/goods_status',['commonid'=>$v.goods_commonid])}','确定要上架吗？');"
            class="dsui-btn-edit"><i class="iconfont"></i>{if $v['goods_status']==3}上架{elseif
            $v['goods_status']==1}下架{/if}</a>
          <?php }?>
        </td>
      </tr>
      <tr style="display:none;">
        <td colspan="20">
          <div class="dssc-goods-sku ps-container"></div>
        </td>
      </tr>
      <?php $index++; } ?>
      {else /}
      <tr class="no_data">
        <td colspan="15">{$Think.lang.ds_no_record}</td>
      </tr>
      {/notempty}
    </tbody>

    <tfoot>
      <!-- <tr class="tfoot">
                  &nbsp;&nbsp;
                  {if $type == 'lockup'}
                  <td><input type="checkbox" class="checkall" id="checkallBottom"></td>
                  <td colspan="16"><label for="checkallBottom">{$Think.lang.ds_select_all}</label>
                      &nbsp;&nbsp;<a href="JavaScript:void(0);" class="btn btn-small" onclick="submit_delete_batch()"><span>{$Think.lang.ds_del}</span></a>
                  </td>
                  {elseif $type == 'waitverify'}
                  <td><input type="checkbox" class="checkall" id="checkallBottom"></td>
                  <td colspan="16"><label for="checkallBottom">{$Think.lang.ds_select_all}</label>
                  <a href="javascript:void(0);" class="btn btn-small" dstype="verify_batch"><span>{$Think.lang.ds_verify}</span></a>
                  </td>
                 {elseif $type == 'allgoods' /}
                 <td><input type="checkbox" class="checkall" id="checkallBottom"></td>
                 <td colspan="16"><label for="checkallBottom">{$Think.lang.ds_select_all}</label>
                 <a href="JavaScript:void(0);" class="btn btn-small" dstype="lockup_batch"><span>{$Think.lang.goods_index_lock}</span></a>
                 </td>
                  {/if}
              </tr>
               -->
    </tfoot>

  </table>
  {$show_page}
</div>
<script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js" charset="utf-8"></script>
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/jquery.mousewheel.js"></script>
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js" charset="utf-8"></script>

<script type="text/javascript">
  var HOMESITEURL = "{$Think.HOME_SITE_URL}";
  /* AJAX选择品牌 */
  $("#ajax_brand").brandinit();

  $('#dssubmit').click(function () {
    $('#formSearch').submit();
  });

  $('#dssubmit').click(function () {
    $('#formSearch').submit();
  });


  // 商品详情查看
  function goods_content(ids_str) {
    _uri = ADMINSITEURL + "/Twogoods/goods_content?commonid=" + ids_str;
    dsLayerOpen(_uri, '商品详情', '1000px', '600px');
  }
  $(function () {
    $('#query_start_time').datepicker({
      dateFormat: 'yy-mm-dd'
    });
    $('#query_end_time').datepicker({
      dateFormat: 'yy-mm-dd'
    });
  });
</script>





{include file="public/footer" /}